Avoid code-duplication in which-key--hide-popup
authorJonas Bernoulli <jonas@bernoul.li>
Sun, 30 May 2021 18:17:49 +0000 (20:17 +0200)
committerJonas Bernoulli <jonas@bernoul.li>
Sun, 30 May 2021 18:17:49 +0000 (20:17 +0200)
which-key.el

index 3514226f93663700c4cf7505a8b608f49c360f8e..b576a5b37861caf43c544bc2fe64f75ac20cb949 100644 (file)
@@ -1143,17 +1143,14 @@ total height."
     (when (and which-key-idle-secondary-delay which-key--secondary-timer-active)
       (which-key--start-timer))
     (which-key--lighter-restore)
-    (cl-case which-key-popup-type
-      ;; Not necessary to hide minibuffer
-      ;; (minibuffer (which-key--hide-buffer-minibuffer))
-      (side-window (which-key--hide-buffer-side-window))
-      (frame (which-key--hide-buffer-frame))
-      (custom (funcall which-key-custom-hide-popup-function)))))
+    (which-key--hide-popup-ignore-command)))
 
 (defun which-key--hide-popup-ignore-command ()
   "Version of `which-key--hide-popup' without the check of
 `real-this-command'."
   (cl-case which-key-popup-type
+    ;; Not necessary to hide minibuffer
+    ;; (minibuffer (which-key--hide-buffer-minibuffer))
     (side-window (which-key--hide-buffer-side-window))
     (frame (which-key--hide-buffer-frame))
     (custom (funcall which-key-custom-hide-popup-function))))